package com.itheima.oneToMany;

import com.itheima.bean01.Student;
import com.itheima.myBatisUtils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class Test02 {
    public static void main(String[] args) {
        SqlSession sqlSession = MyBatisUtils.getSqlSession();
        StudentMapper mapper = sqlSession.getMapper(StudentMapper.class);
        List<Student> students = mapper.selectById(1);
        for (Student student : students) {
            System.out.println(student);
        }
    }
}
